//    Copyright (C) Kherty.  All rights reserved.
using OpenLS.Core.Serialization;
using OpenLS.Drawing.Serialization;

namespace OpenLS.Drawing
{
    public class ConnectorLocking : Locking, IOfficeXmlSerializable
    {
        private OfficeArtExtensionList extLst;

        public OfficeArtExtensionList Extension
        {
            get { return extLst; }
            set { extLst = value; }
        }

        #region IOfficeXmlSerializable Members

        void IOfficeXmlSerializable.ReadXml(ReadContext context)
        {
            using (var c = context.Read(DrawingConstants.DrawingNamespace + "cxnSpLocks"))
            {
                ReadAttributes(c);
                Extension = c.ReadOptionalElement<OfficeArtExtensionList>("extLst");
            }
        }

        void IOfficeXmlSerializable.WriteXml(WriteContext context)
        {
            using (WriteContext c = context.Write(DrawingConstants.DrawingNamespace + "cxnSpLocks"))
            {
                WriteAttributes(c);
                c.WriteOptionalElement(Extension);
            }
        }

        #endregion
    }
}